Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Contrib > Timepicker visual tests #1895

Merged
merged 15 commits into from
Aug 21, 2018

Conversation

blackbaud-conorwright
Copy link
Contributor

@blackbaud-conorwright blackbaud-conorwright commented Aug 13, 2018

changes moved from #1888 by @Remulus2006 to avoid history issues

Resolves: #1449

@codecov-io
Copy link

codecov-io commented Aug 13, 2018

Codecov Report

Merging #1895 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1895   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         416     416           
  Lines        8757    8757           
  Branches     1292    1292           
======================================
  Hits         8757    8757

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcd87c3...fe2c25b. Read the comment docs.

Copy link
Member

@Blackbaud-TrevorBurch Blackbaud-TrevorBurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blackbaud-conorwright just a few things to look at.


<br/>

<h3>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any actual tests testing this third state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think this was copied from the demo template. The only visual difference seems to be that the input field is a type=hidden making it invisible. This doesn't really influence the visual state of the timepicker itself, so I don't think this is a case where we need visual test coverage. I'll remove it from the template.

type="text"
[skyTimepickerInput]="timePickerExample1"
[timeFormat]="format12"
[(ngModel)]="selectedTime1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I try to run this locally I'm getting "Property 'selectedTime1' does not exist on type 'TimpickerVisualComponent'" errors. It does not appear that it exists so the error makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this wasn't run locally, the template seems to be a copy of the demo with the ids added. I'll clean it up and remove the non-existent references

return SkyVisualTest
.setupTest('timepicker')
.then(() => {
element(by.css('.sky-dropdown-button')).click();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we will be opening the first dropdown here just like the first test as both dropdowns are on the same page and we aren't specifying which instance to grab.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this is definitely not targeting specific dropdowns. I'll switch it

Copy link
Member

@Blackbaud-TrevorBurch Blackbaud-TrevorBurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blackbaud-conorwright one more change needed

@@ -0,0 +1,60 @@
import {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file needs renamed to timepicker.visual-spec.ts (notice the period instead of the dash after "timepicker"). Otherwise these tests will not run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh haha nice catch, I was wondering why it wasn't running for me 😛

@Blackbaud-TrevorBurch
Copy link
Member

@blackbaud-conorwright the selectors for the two test for the open state aren't giving us what we want. Below is what outputs for these tests and they are the same as the non-open screenshots. I believe we want to make sure that we have the full dropdown in the screenshot here.

timepicker12hr-open-chrome-1000x800-dpr-1
timepicker24hr-open-chrome-1000x800-dpr-1

@blackbaud-conorwright
Copy link
Contributor Author

The screenshot functionality is really finnicky about height 😕
I have the primary visuals in the screenshots now though. Very nice catch @Blackbaud-TrevorBurch

Copy link
Member

@Blackbaud-TrevorBurch Blackbaud-TrevorBurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

@blackbaud-conorwright blackbaud-conorwright merged commit f3d854f into master Aug 21, 2018
@blackbaud-conorwright blackbaud-conorwright deleted the contrib-timepicker-visual-tests branch August 21, 2018 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants